package design;

import design.forkjoin.RecuresiceAction1;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.ForkJoinPool;

public class ForkJoinTest3 {
    public static void main(String[] args) {
        RecuresiceAction1  task = new RecuresiceAction1(1,10);
        ForkJoinPool pool = new ForkJoinPool();
        pool.submit(task);
        try {
            System.out.println(task.get());
        } catch (InterruptedException e) {
            e.printStackTrace();
        } catch (ExecutionException e) {
            e.printStackTrace();
        }
    }
}
